﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entropy3D.Graphics
{
    /*
     * Container class for all the drawable objects.
     */
    public class Pool
    {
        private static List<GraphicsObject> objects = new List<GraphicsObject>();
        public static List<GraphicsObject> Objects
        {
            get { return objects; }
        }

        private Engine engine;

        public Pool(Engine e)
        {
            this.engine = e;
        }

        public static void AddObject(GraphicsObject go)
        {
            if (!objects.Contains(go))
            {
                objects.Add(go);
            }
        }

        public static void RemoveObject(GraphicsObject go)
        {
            if (objects.Contains(go))
            {
                objects.Remove(go);
            }
        }
    }
}
